package joodle.ui;

import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.AbstractAction;
import javax.swing.JDialog;

import joodle.si.ResourceManager;
/**
 * This class will be handling the actions on the "Action" button
 *
 */
@SuppressWarnings("serial")
public class AboutAction extends AbstractAction {

	final Frame frame;
	
	public AboutAction(Frame f) {
		super(ResourceManager.message("ABOUT"), ResourceManager.makeIcon("about"));
		putValue(MNEMONIC_KEY, KeyEvent.VK_A);
		this.frame = f;
		
	}
	/**
	 * @see AbstractAction#actionPerformed(ActionEvent) 
	 */
	@Override
	public void actionPerformed(ActionEvent arg0) {
		JDialog jd = new AboutDialog(frame);
		jd.setVisible(true);
	}

}
